home *** CD-ROM | disk | FTP | other *** search
- /* driver.h - Useful declarations for driver.c. By Pete Resnick */
-
- typedef enum {
- open = 0x01, /* Open the driver after installed */
- thinkDATA = 0x02, /* Driver uses THINK C global data DATA rsrc */
- thinkMultSeg = 0x04 /* Driver uses THINK C multi-segment DCOD rsrc's */
- } drvrInstFlagBits;
-
- typedef struct {
- short drvrFlags;
- short drvrDelay;
- short drvrEMask;
- short drvrMenu;
- short drvrOpen;
- short drvrPrime;
- short drvrCtl;
- short drvrStatus;
- short drvrClose;
- Str255 drvrName;
- unsigned char drvrRoutines[];
- } DriverStruct, *DriverPtr, **DriverHandle;
-
- /* These two documented in Technical Note 184 */
- pascal OSErr DrvrInstall(Handle drvrHandle, short refNum);
- pascal OSErr DrvrRemove(short refNum);
-
- /* These three routines are the ones you want to call */
- OSErr InstallRAMDriver(Str255 drvrName, short *refNum, Byte drvrInstFlags);
- OSErr RemoveRAMDriver(short refNum, Boolean dcodRemove);
- short GetDrvrRefNum(Str255 drvrName);
-
- /* These are used internally and might be useful in unusual circumstances */
- OSErr GrowUTable(short newEntries);
- OSErr DriverAvail(short *unitNum);
- void ReleaseDrvrSegments(Handle *dcodHList, short rsrcID, Boolean detach);
-